home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 401-425 / disk_403 / rexxhostlib / rexxhostbase.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  6KB  |  181 lines

  1. /* $Revision Header * Header built automatically - do not edit! *************
  2.  *
  3.  *    (C) Copyright 1990 by MXM
  4.  *
  5.  *    Name .....: rexxhostbase.h
  6.  *    Created ..: Sunday 07-Jan-90 18:55
  7.  *    Revision .: 6
  8.  *
  9.  *    Date            Author          Comment
  10.  *    =========       ========        ====================
  11.  *    09-Sep-90       Olsen           Added new function
  12.  *    24-May-90       Olsen           Added new functions
  13.  *    31-Mar-90       Olsen           General cleanup, added HOSTMASK
  14.  *    17-Mar-90       Olsen           Compatibility fixes
  15.  *    16-Mar-90       Olsen           Added protos & pragmas
  16.  *    07-Jan-90       Olsen           Created this file!
  17.  *
  18.  ****************************************************************************
  19.  *
  20.  *    This Amiga shared library is based on example source code
  21.  *    written by Gary Samad & Bill Hawes.
  22.  *
  23.  * $Revision Header ********************************************************/
  24.  
  25. #ifndef _REXXHOSTBASE_H
  26. #define _REXXHOSTBASE_H 1
  27.  
  28. #ifndef REXX_RXSLIB_H
  29. #include <rexx/rxslib.h>
  30. #endif    /* !REXX_RXSLIB_H */
  31.  
  32.     /* Main library structure (note: RexxSysBase can be reused
  33.      * by opening program).
  34.      */
  35.  
  36. struct RexxHostBase
  37. {
  38.     struct Library     LibNode;
  39.     struct RxsLib    *RexxSysBase;
  40.  
  41.     /* Everything below this point is considered PRIVATE and
  42.      * subject to change without notice (even though there isn't
  43.      * very much yet).
  44.      */
  45. };
  46.  
  47.     /* This is an extended MsgPort structure which includes
  48.      * a special ID CreateRexxHost/DeleteRexxHost/SendRexxCommand
  49.      * rely on.
  50.      */
  51.  
  52. struct RexxHost
  53. {
  54.     struct MsgPort    rh_Port;    /* Exec link. */
  55.  
  56.         /* Never touch the tags below,
  57.          * hands off - this may change
  58.          * soon.
  59.          */
  60.  
  61.     ULONG        rh_Private0;
  62.     ULONG        rh_Private1[4];
  63. };
  64.  
  65.     /* This macro can be used to turn the signal bit
  66.      * contained in a RexxHost into a Wait-mask.
  67.      * Note: Argument must be a pointer.
  68.      */
  69.  
  70. #define HOSTMASK(Host) (1L << ((struct RexxHost *)Host) -> rh_Port . mp_SigBit)
  71.  
  72.     /* Library name and current revision. */
  73.  
  74. #define REXXHOSTNAME    "rexxhost.library"
  75. #define REXXHOSTVERSION    36L
  76.  
  77.     /* Use this value rather than REXXHOSTVERSION to open
  78.      * rexxhost.library.
  79.      */
  80.  
  81. #define REXXHOSTMINIMUM    34L
  82.  
  83.     /* The compiler version differences require the
  84.      * following preprocessor 'orgy'.
  85.      */
  86.  
  87. #ifdef __NO_PROTOS
  88. #undef __NO_PROTOS
  89. #endif    /* __NO_PROTOS */
  90.  
  91. #ifdef AZTEC_C
  92.  
  93.     /* No version symbol? We'll redefine it. */
  94.  
  95. #ifndef __VERSION
  96. #define __VERSION 360
  97. #endif    /* __VERSION */
  98.  
  99.     /* Aztec 'C' 5.0 includes full prototype checking and
  100.      * pragma support.
  101.      */
  102.  
  103. #if __VERSION < 500
  104. #define __NO_PROTOS    1
  105. #define __NO_PRAGMAS    1
  106. #endif    /* __VERSION */
  107.  
  108. #endif    /* AZTEC_C */
  109.  
  110.     /* Now for the prototype handling. */
  111.  
  112. #ifdef __NO_PROTOS
  113. #define __ARGS(x) ()
  114. #else
  115. #define __ARGS(x) x
  116. #endif    /* __NO_PROTOS */
  117.  
  118.     /* Prototypes for library functions. */
  119.  
  120. struct RexxHost *    CreateRexxHost __ARGS((STRPTR));
  121. VOID *            DeleteRexxHost __ARGS((struct RexxHost *));
  122. LONG            SendRexxCommand __ARGS((struct RexxHost *,STRPTR,STRPTR,STRPTR));
  123. VOID            FreeRexxCommand __ARGS((struct RexxMsg *));
  124. VOID            ReplyRexxCommand __ARGS((struct RexxMsg *,LONG,LONG,STRPTR));
  125. STRPTR            GetRexxCommand __ARGS((struct RexxMsg *));
  126. STRPTR            GetRexxArg __ARGS((struct RexxMsg *));
  127. LONG            GetRexxResult1 __ARGS((struct RexxMsg *));
  128. LONG            GetRexxResult2 __ARGS((struct RexxMsg *));
  129. STRPTR            GetToken __ARGS((STRPTR,LONG *,STRPTR,LONG));
  130. LONG            GetStringValue __ARGS((STRPTR));
  131. STRPTR            BuildValueString __ARGS((LONG,STRPTR));
  132. LONG            RexxStrCmp __ARGS((UBYTE *,UBYTE *));
  133. struct RexxMsg *    GetRexxMsg __ARGS((struct RexxHost *,LONG));
  134. ULONG            SendRexxMsg __ARGS((STRPTR,STRPTR *,STRPTR,LONG));
  135. VOID            GetRexxString __ARGS((STRPTR,STRPTR));
  136. LONG            GetRexxClip __ARGS((char *Name,LONG WhichArg));
  137.  
  138.     /* The pragmas, both for Manx & Lattice. */
  139.  
  140. #ifndef __NO_PRAGMAS
  141. #ifdef AZTEC_C
  142. #pragma amicall(RexxHostBase, 0x1e, CreateRexxHost(a0))
  143. #pragma amicall(RexxHostBase, 0x24, DeleteRexxHost(a0))
  144. #pragma amicall(RexxHostBase, 0x2a, SendRexxCommand(a0,a1,a2,a3))
  145. #pragma amicall(RexxHostBase, 0x30, FreeRexxCommand(a0))
  146. #pragma amicall(RexxHostBase, 0x36, ReplyRexxCommand(a0,d0,d1,a1))
  147. #pragma amicall(RexxHostBase, 0x3c, GetRexxCommand(a0))
  148. #pragma amicall(RexxHostBase, 0x42, GetRexxArg(a0))
  149. #pragma amicall(RexxHostBase, 0x48, GetRexxResult1(a0))
  150. #pragma amicall(RexxHostBase, 0x4e, GetRexxResult2(a0))
  151. #pragma amicall(RexxHostBase, 0x54, GetToken(a0,a1,a2,d0))
  152. #pragma amicall(RexxHostBase, 0x5a, GetStringValue(a0))
  153. #pragma amicall(RexxHostBase, 0x60, BuildValueString(d0,a0))
  154. #pragma amicall(RexxHostBase, 0x66, RexxStrCmp(a0,a1))
  155. #pragma amicall(RexxHostBase, 0x6c, GetRexxMsg(a0,d0))
  156. #pragma amicall(RexxHostBase, 0x72, SendRexxMsg(a0,a1,a2,d0))
  157. #pragma amicall(RexxHostBase, 0x78, GetRexxString(d0,d1))
  158. #pragma amicall(RexxHostBase, 0x7e, GetRexxClip(a0,d0))
  159. #else    /* AZTEC_C */
  160. #pragma libcall RexxHostBase CreateRexxHost 1e 801
  161. #pragma libcall RexxHostBase DeleteRexxHost 24 801
  162. #pragma libcall RexxHostBase SendRexxCommand 2a ba9804
  163. #pragma libcall RexxHostBase FreeRexxCommand 30 801
  164. #pragma libcall RexxHostBase ReplyRexxCommand 36 910804
  165. #pragma libcall RexxHostBase GetRexxCommand 3c 801
  166. #pragma libcall RexxHostBase GetRexxArg 42 801
  167. #pragma libcall RexxHostBase GetRexxResult1 48 801
  168. #pragma libcall RexxHostBase GetRexxResult2 4e 801
  169. #pragma libcall RexxHostBase GetToken 54 a9804
  170. #pragma libcall RexxHostBase GetStringValue 5a 801
  171. #pragma libcall RexxHostBase BuildValueString 60 8002
  172. #pragma libcall RexxHostBase RexxStrCmp 66 9802
  173. #pragma libcall RexxHostBase GetRexxMsg 6c 802
  174. #pragma libcall RexxHostBase SendRexxMsg 72 a9804 
  175. #pragma libcall RexxHostBase GetRexxString 78 1002
  176. #pragma libcall RexxHostBase GetRexxClip 7e 802
  177. #endif    /* AZTEC_C */
  178. #endif    /* __NO_PRAGMAS */
  179.  
  180. #endif    /* _REXXHOSTBASE_H */
  181.